package main

import "fmt"

type A struct {
	name string
	age  int
}

type File struct {
	name string
	size int
}

func main() {
	aa := new(A)
	aa.name = "cpp"
	aa.age = 25

	bb := &A{name: "cpp11", age: 28}

	cc := aa

	dd := NewFile("old", 122)

	ee := *bb

	fmt.Printf("%v\n", aa)
	fmt.Printf("%v\n", bb)
	fmt.Printf("%v\n", cc)
	fmt.Printf("%v\n", dd)
	fmt.Printf("%v\n", ee)
}

func NewFile(name string, size int) *File {
	return &File{name: name, size: size}
}
